var fs = require('fs')

fs.open('./text.txt', 'r', (err, fd) => {
    if (err) {
        throw err
    }
    console.log('open file success.')
    
    var buffer = new Buffer(255)
    fs.read(fd, buffer, 0, 10, 0, (err, bytesRead, buffer) => {
        if (err) {
            throw err
        }
        console.log('aaaa', bytesRead, buffer.slice(0, bytesRead).toString)
        fs.close(fd)
    })

})